/****
 * let   vs  const
 * 解构
 * 展开
 *  */ 
function f(){
    var message="Hello World"
    var a=10
    return function g(){
        var b=a+1
        return b
    }
}

var g=f()
g()


for (var i=0;i<10;i++){
    (function(j){
         setTimeout(function(){console.log(j)},100)//0---9
    })(i)
}
for (var i=0;i<10;i++){
         setTimeout(function(){console.log(j)},100)//10次10
}
for (let i=0;i<10;i++){
         setTimeout(function(){console.log(j)},100)//0---9
}
function gg(condition,x){
    if(condition){
        let x=100
        return x
    }
}


gg(false,0)
gg(true,0)